package com.yang.designmode.ActionMode.state.mario.state;

public class FireMario implements IMario{

    private static final FireMario instance = new FireMario();
    private FireMario(){}

    public static FireMario getInstance(){
        return instance;
    }

    @Override
    public State getName() {
        return State.FIRE;
    }

    @Override
    public void obtainMushRoom(MarioStateMachine machine) {

    }

    @Override
    public void obtainCape(MarioStateMachine machine) {
        machine.setMario(CapeMario.getInstance());
        machine.setScore(machine.getScore() + 200);
    }

    @Override
    public void obtainFire(MarioStateMachine machine) {
        machine.setMario(FireMario.getInstance());
        machine.setScore(machine.getScore() + 300);
    }

    @Override
    public void meetMonster(MarioStateMachine machine) {
        machine.setMario(SmallMario.getInstance());
        machine.setScore(machine.getScore() - 300);
    }
}
